package com.zHan.anno;

import com.zHan.validation.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * ClassName: Status
 * Description:
 * date: 2023/11/9 0009 19:59
 *
 * @author zHan
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {StateValidation.class})
public @interface State {
    // 提供校验失败后的提示信息
    String message() default "status参数只能是 已发布 或者 草稿 ";

    // 指定分组
    Class<?>[] groups() default {};

    // 负载 获取到Status注解的附加信息
    Class<? extends Payload>[] payload() default {};
}
